home *** CD-ROM | disk | FTP | other *** search
- /* part of another serial port test program. */
- /* works best when connected to another computer via a null modem. */
- /* first run testrecv in a one CLI; then run testsend in another CLI. */
-
- /* open the Rexx support library */
-
- signal on break_c
- if ~show('L',"rexxsupport.library") then do
- if addlib('rexxsupport.library',0,-30,0) then
- say 'added rexxsupport.library'
- else do;
- say 'support library not available'
- exit 10
- end
- end
-
- if ~show( 'L', "rexxserdev.library" ) then do
- if addlib( 'rexxserdev.library', 0, -30, 0 ) then
- say 'added rexxserdev.library'
- else do;
- say 'support library not available'
- exit 10
- end
- end
-
- libaddr = serlibbase()
- say 'serial library base =' libaddr
- dh = seropen( 'serial.device', 0 )
- if dh = 0 then say 'serial device not opened'
- text = 'send stuff out port again and again.' || '0d'x
- say 'calling SerWrite'
- do for 500
- if ~serwrite( dh, text, length( text ) ) then say 'nothing written'
- end
- break_c:
- say 'back from SerWrite'
- if serclose( dh ) then say 'serial device closed'
-